<!-- 主题设置模板 -->


<script type="text/html" template lay-done="layui.data.sendParams(d.params);"></script>
<div>
  <div class="LAY-app-message-btns" style="margin-bottom: 10px;">
    <button class="layui-btn layui-btn-primary" @click=" showForm">添加</button>
    <button class="layui-btn layui-btn-primary">标记已读</button>
    <button class=" layui-btn layui-btn-primary">全部已读</button>
  </div>
  {{count}}
</div>



<script>
  layui.data.sendParams = function (params) {

    let { viewId, ...param } = params;
    viewId = viewId || 'appId';

    //若需用到 layui 组件，layui.use 需写在该全局方法里面，如：
    layui.use(['admin', 'baseApi', 'view'], function () {

      var admin = layui.admin;
      var baseApi = layui.baseApi;
      var gameId = layui.router().search.id;
      var view = layui.view;

      var myApp = new Vue({
        el: '#' + viewId,
        data: function () {
          return {
            gameId: gameId, // 假设这是从某处获取的游戏ID  
            count: 0,
            dataList: []
          }
        }
        , methods: {
          goAd(data) {
            if (data.adStatus == 0) {
              location.hash = '/report/order/id=' + gameId + '/year=' + data.year;
            } else {
              location.hash = '/report/orderEnd/id=' + gameId + '/year=' + data.year;
            }
            // return 'Team/edit/id=' + id;
          },
          getData() {

          },
          reload() {
            myApp.count = 100;
          },
          loadForm(value) {
            myApp.count = value;
          },
          showForm() {
            admin.popup({
              title: '添加分类'
              , area: ['450px', '200px']
              , id: 'LAY-popup-content-tags'
              , success: function (layero, index) {
                view(this.id).render('test/vueFrom', { closeIndex: index, loadForm: myApp.loadForm })
              }
            });
          },
        },
        mounted: function () {
          // this.getData();


        },
        created: function () {
          //	this.getData();
        },


      });

    });
  }
</script>